#if !defined(_SQLPOOL_H_)
#define _SQLPOOL_H_

#include <string>
#include <cpool.h>

class asud_connection_pool : public mysqlpp::ConnectionPool
{
    public:
        asud_connection_pool( const std::string &_server, const std::string &_user, const std::string &_password,  const std::string &_db);
        virtual ~asud_connection_pool();

    protected:

        mysqlpp::Connection* create();
        void destroy( mysqlpp::Connection *con );

        unsigned int max_idle_time();

        std::string db_;
        std::string server_;
        std::string user_;
        std::string password_;
};

#endif // _SQLPOOL_H_
